package model;

/**
 * CD.java
 * Purpose: This class represent a CD object
 * 
 * @author Hans Brems
 * @version 1.0 10/12/2011
 */

public class CD extends Product {
	/* The artist of the CD */
	String artist;
	/* The title of the CD */
	String title;
	/* The genre of the CD */
	String genre;
	
	/** Constructs a new CD */
	public CD() {
	}

	/** Constructs a new CD */
	public CD(int productID) {
		this.productID = productID;
	}

	/** Constructs a new CD */
	public CD(int productID, String artist, String title, String genre) {
		this.productID = productID;
		this.artist = artist;
		this.title = title;
		this.genre = genre;
	}

	/** Returns the artist of the CD */
	public String getArtist() {
		return this.artist;
	}

	/** Sets the artist of the CD */
	public void setArtist(String artist) {
		this.artist = artist;
	}

	/** Returns the title of the CD */
	public String getTitle() {
		return this.title;
	}
	
	/** Sets the title of the CD */
	public void setTitle(String title) {
		this.title = title;
	}

	/** Returns the genre of the CD */
	public String getGenre() {
		return this.genre;
	}

	/** Sets the genre of the CD */
	public void setGenre(String genre) {
		this.genre = genre;
	}
	
	/** Returns a string representation of the CD */
	@Override
	public String toString() {
		return this.title + " by " + this.artist;
	}
}